package com.znsd.zl.collect.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.znsd.zl.browse.entity.vo.TBrowseEntityVo;
import com.znsd.zl.collect.entity.CollectEntity;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @ClassName CollectDao
 * @Description 房源Collect持久层
 * @author xyx
 * @date 2020-08-28 14:48:33
 * @Version v1.0
 */
@Component
@Mapper
public interface CollectDao extends BaseMapper<CollectEntity> {

	/**
	 * 按用户Id查询收藏记录
	 * @param appId
	 * @return
	 */
	List<TBrowseEntityVo> findCollect(Integer appId);

	/**
	 * 查询所有收藏记录
	 * @return
	 */
	List<CollectEntity> findByAll();

	/**
	 * 删除收藏记录
	 * @param entity
	 * @return
	 */
	Boolean deleteCollect(CollectEntity entity);
}
